using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class StartMenu : MonoBehaviour
{
    [SerializeField]
    private Button _startButton;

    [SerializeField]
    private SceneLoader _sceneLoader;

    private AsyncOperation _loadScene;


    private void Start()
    {
        _loadScene = _sceneLoader.LoadSceneAsync(1);

        _startButton.onClick.AddListener(StartGame);
    }

    private void StartGame()
    {
        _sceneLoader.ActivateAsyncScene(_loadScene);
    }
}
